<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
	<head>
        <meta charset="utf-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1">
		<meta name="keywords" th:content="${article.seoKey}">
		<meta name="description" th:content="${article.seoDesc}">
		<title th:text="${article.title}"></title>
		<link rel="icon" th:href="${config.SITE_ICON}">
		<link th:href="${static+'/css/bootstrap.min.css'}" rel="stylesheet"/>
		<link th:href="${static+'/iconfont/iconfont.css'}" rel="stylesheet"/>
		<link th:href="${static+'/css/github-markdown.min.css'}"rel="stylesheet" />
		<link th:href="${static+'/css/blog.css'}"rel="stylesheet" />
		<script th:src="${static+'/js/jquery.min.js'}"></script>
		<script th:src="${static+'/js/bootstrap.min.js'}"></script>
		<script th:src="${static+'/js/blog.js'}"></script>
	</head>
	<body>
		<header id="header">
			<div th:replace="theme/nbclass/fragments/navbar :: navbar"></div>
		</header>
		<div class="zb-container zb-content">
			<div class="zb-main">
				<div class="article-main">
					<h3 th:text="${article.title}" class="article-title"></h3>
					<span th:text="${article.origin==1 ? '原创' : '转载'}" class="article-original"></span>
					<div class="article-meta">发布于 <span th:text="${#dates.format(article.createTime,'yyyy-MM-dd')}"></span> &nbsp;|&nbsp; <span th:text="${article.category.name}"></span> &nbsp;|&nbsp; 浏览（<span th:text="${article.lookNum}"></span>） &nbsp;|&nbsp; 评论（<span th:text="${article.commentNum}"></span>）</div>
					<hr class="hr0" />
					<div th:utext="${article.content}" class="article-body markdown-body editor-preview-active-side">
					</div>
					<div class="thumbs-content">
						<span class="thumbs-button fa fa-thumbs-up"> 点赞 <span id="loveCount" th:text="${article.supportNum}"></span></span>
						<span th:if="${currentTheme.setting.zanShang=='1'}" class="reward-button fa fa-money"> 打赏
							<p class="reward-content">
								<span class="reward-img"><img th:src="${currentTheme.setting.wxPayCode}"><br>微信赞赏</span>
								<span class="reward-img"><img th:src="${currentTheme.setting.aliPayCode}"><br>支付宝赞赏</span>
							</p>
							<span class="reward-bottom"></span>
							<span class="reward-bottom-top"></span>
						</span>
					</div>
				</div>
				<div th:if="${article.isComment}" id="comment" class="comment comment-main">
					<div class="comment-title">发表评论</div>
				</div>
			</div>
			<div th:replace="theme/nbclass/fragments/sidebar :: sidebar"></div>
			<div class="return_top"><a class=" fa fa-arrow-up"></a></div>
		</div>
		<script>
			$(function () {
                $(".thumbs-button").click(function () {
                    Core.postAjax("/api/article/love",{articleId:[[${article.id}]]},function (data) {
						if(data.status===200){
						    var $count = $("#loveCount");
                            $count.text(parseInt($count.text())+1);
                        }else{
                            Core.msg(data.msg,2);
                        }
                    })
                })
            })
		</script>
		<script th:if="${article.isComment}">
            Core.initComment({
                id:"#comment",
                sid: "[[${article.id}]]",
                emojiServer:  "[[${static}]]"+"/emoji/"
            });
		</script>
	</body>

</html>